package cn.itzzx.lagou.netty.rpc;

import cn.itzzx.lagou.netty.rpc.common.service.UserService;
import cn.itzzx.lagou.netty.rpc.customer.RPCConsumer;

/**
 * TODO 写点注视啦
 *
 * @author Martin
 * @date 2020-06-17
 * @see 1.0
 */
public class ConsumerBoot {
    public static void main(String[] args) throws InterruptedException {
        //1.创建代理对象
        UserService service = (UserService) RPCConsumer.createProxy(UserService.class);

        //2.循环给服务器写数据
        while (true){
            String result = service.sayHello("are you ok !!");
            System.out.println("收到服务端信息: " +result);
            Thread.sleep(2000);
        }
    }
}
